#pragma once
#include "DrawView.h"
namespace UILib
{
    class CDrawButton : public CDrawView
    {
    public:
        CDrawButton(void);
        CDrawButton( Bitmap* pBitmap, const PUIRect pRect, const PSplitPos pSplit = NULL, const UINT uID = -1, const int nStatusCount = 4, ViewListener* pListener = NULL );
        virtual ~CDrawButton(void);

        wstring GetClass() { return L"CDrawButton"; };

        void SetSel(const int nSel, const int nStatus = 4);
        int  GetSel() const { return nSelIndex_; };

        void SetText(wstring wszText, const LOGFONT lf, const COLORREF color = 0x000000 );
        void SetText(wstring wszText);

        void SetIcon(Bitmap* pIcon, const int nTextOff );

        void SetGDIPlusEnable(const bool bEnable);

        virtual void DrawElement( const HDC hDC, const RECT &rcPaint );
    private:
        Bitmap*     pBitMap_;
        Bitmap*     pIcon_;
        SplitPos    pSplit_;

        int         nStatusCount_;
        int         nSelIndex_;
        int         nStatusOfSel_;

        wstring     wstrText_;
        LOGFONT     lf_;
        COLORREF    color_;

        int         nTextOff_;

        bool        bGDIPlushEnable_;
    };
}